﻿.upload .upload-body {
    margin-top: 10px;
}

    .upload .upload-body.is-list {
        overflow: auto;
        max-height: 240px;
    }

        .upload .upload-body.is-list .upload-item {
            display: flex;
            align-items: center;
            padding: 3px 5px;
            border-radius: 3px;
            transition: background-color .3s linear;
            cursor: pointer;
            position: relative;
        }

            .upload .upload-body.is-list .upload-item.is-invalid {
                color: #dc3545;
            }

            .upload .upload-body.is-list .upload-item:hover {
                background-color: #ebeef5;
            }

            .upload .upload-body.is-list .upload-item:not(:last-child) {
                margin-bottom: 2px;
            }

            .upload .upload-body.is-list .upload-item:hover .fa-trash-o {
                display: inline-block;
            }

            .upload .upload-body.is-list .upload-item .fn {
                flex: 1;
                padding: 0 5px;
                display: flex;
                overflow: hidden;
            }

                .upload .upload-body.is-list .upload-item .fn span:first-child {
                    max-width: calc(100% - 4rem);
                    overflow: hidden;
                    text-overflow: ellipsis;
                    display: block;
                    white-space: nowrap;
                    padding-right: 0.25rem;
                }

            .upload .upload-body.is-list .upload-item .fa-trash-o,
            .upload .upload-body.is-list .upload-item:not(.is-disabled):hover .fa-check-circle-o,
            .upload .upload-body.is-list .upload-item:hover .fa-times-circle-o,
            .upload .upload-body.is-avatar .upload-item .upload-item-delete,
            .upload .upload-body.is-avatar .upload-item.is-invalid .upload-item-spin,
            .upload .upload-body.is-avatar .upload-item.is-valid .upload-item-spin,
            .upload .upload-item.is-invalid .fa-check,
            .upload .upload-item.is-valid .fa-times,
            .upload .upload-body.is-avatar .upload-item.is-disabled .upload-item-plus {
                display: none;
            }

    .upload .upload-body.is-avatar,
    .upload .upload-body.is-card {
        margin: 0;
        display: flex;
        flex-wrap: wrap;
    }

        .upload .upload-body.is-avatar .upload-item {
            padding: 0;
            position: relative;
            border: 1px dashed #d9d9d9;
            border-radius: 6px;
            margin-right: 1rem;
            margin-bottom: 1rem;
            overflow: hidden;
            cursor: pointer;
        }

            .upload .upload-body.is-avatar .upload-item.is-invalid {
                border-color: #dc3545;
                border-style: solid;
            }

            .upload .upload-body.is-avatar .upload-item.is-circle {
                border-radius: 50%;
            }

            .upload .upload-body.is-avatar .upload-item:not(.is-form):hover,
            .upload .upload-body.is-avatar .upload-item:not(.is-form).is-valid,
            .upload .upload-body.is-card .upload-item.is-valid,
            .upload .upload-body.is-card .upload-item:not(.is-disabled):hover {
                border-color: #409eff;
            }

            .upload .upload-body.is-avatar .upload-item.is-valid {
                border-style: solid;
            }

            .upload .upload-body.is-avatar .upload-item.is-invalid .avatar {
                color: #dc3545;
            }

            .upload .upload-body.is-avatar .upload-item .avatar {
                width: 100%;
                height: 100%;
                background-color: #fff;
            }

            .upload .upload-body.is-avatar .upload-item .upload-item-actions,
            .upload .upload-body.is-card .upload-item .upload-item-actions.btn-browser {
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                display: flex;
                align-items: center;
                justify-content: center;
            }

                .upload .upload-body.is-avatar .upload-item .upload-item-actions .fa {
                    font-size: 1rem;
                }

            .upload .upload-body.is-avatar .upload-item:hover .upload-item-actions .upload-item-delete {
                display: block;
            }

        .upload .upload-body.is-card .upload-item {
            padding: 1rem;
            box-shadow: 0 0 10px 0 rgba(0,0,0,.2);
            border: 1px solid #d9d9d9;
            border-radius: 6px;
            width: 240px;
            height: 280px;
            position: relative;
            cursor: pointer;
            margin-right: 1rem;
            margin-bottom: 1rem;
            overflow: hidden;
        }

            .upload .upload-body.is-card .upload-item .upload-item-actions {
                display: flex;
                justify-content: space-between;
            }

            .upload .upload-body.is-card .upload-item.is-valid .upload-item-body img,
            .upload .upload-body .upload-item.is-valid .upload-item-label,
            .upload .upload-body .upload-item.is-invalid .upload-item-label {
                display: block;
            }

        .upload .upload-body.is-card .is-invalid .upload-item-body {
            border-color: #dc3545;
        }

        .upload .upload-body.is-card .upload-item-body {
            border-radius: 4px;
            width: 168px;
            height: 168px;
            border: 1px solid #d9d9d9;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

            .upload .upload-body.is-card .upload-item-body img {
                width: 100%;
                object-fit: cover;
                display: none;
            }

            .upload .upload-body.is-card .upload-item-body .fa {
                font-size: 1.5rem;
            }

        .upload .upload-body.is-card .upload-item-size {
            margin: 1rem auto;
            text-align: center;
            font-size: 0.625rem;
            display: flex;
            justify-content: center;
        }

            .upload .upload-body.is-card .upload-item-size span {
                max-width: calc(100% - 4.5rem);
                overflow: hidden;
                text-overflow: ellipsis;
                display: block;
                white-space: nowrap;
                padding-right: 0.25rem;
            }

.upload .upload-item .upload-item-label {
    position: absolute;
    top: -2px;
    right: -14px;
    text-align: center;
    transform: rotate(45deg);
    color: #fff;
    width: 46px;
    height: 20px;
    background-color: #28a745;
    display: none;
}

    .upload .upload-item .upload-item-label .fa-check {
        transform: rotate(-45deg);
        font-size: 12px;
    }

.upload .upload-item.is-invalid .upload-item-label {
    background-color: #dc3545;
}

.upload .progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

.upload .upload-body.is-card .progress {
    left: 1rem;
    right: 1rem;
    bottom: 56px;
}

.upload .upload-item.is-valid .progress,
.upload .upload-item.is-invalid .progress {
    display: none;
}

@media (min-width: 576px) {
    .form-inline .upload {
        width: 100%;
    }
}

@media (min-width: 768px) {
    .form-inline .upload {
        width: calc(100% - 104px);
    }
}
